package com.company;

import java.util.ArrayList;
import java.util.Scanner;

/**
 * @author jrue
 * @version 1.0
 * @date 2020/3/19 19:09
 */
public class Main16 {

    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        int n = sc.nextInt();
        if (n == 0) {
            System.out.println(0);
            return;
        }
        int[] data = new int[n];
        for (int i = 0; i < data.length; i++) {
            data[i] = sc.nextInt();
        }
        int[] dp = new int[n];
        dp[0] = 1;
        for (int i = 1; i < dp.length; i++) {
            if (data[i] > data[i - 1]) {
                dp[i] = dp[i - 1] + 1;
            } else {
                dp[i] = 1;
            }
        }

        int left = 0,right = 1;
        int max = 0;
        while (right < n - 1) {
            if (dp[right] == 1) {
                left = right - 1;
                right = right + 1;
                if (data[right] > data[left]) {
                    int c = right;
                    while (c < n && dp[c] != 1 ) {
                        max = Math.max(dp[c] + 1,max);
                        c++;
                    }
                }
            } else {
                right++;
            }
        }
        if (max == 0) {
            for (int i = 0; i < dp.length; i++) {
                max = Math.max(dp[i],max);
            }
        }
        System.out.println(max);
    }

}
